<#include "/common/taglibs.ftl" />
<#assign entityName = 'i18nResource'/>
<@menu code='${entityName!}'/>
<title><@spring.message code="${entityName!}" /> - <@spring.message code="list" /></title>
<div class="m-portlet m-portlet--mobile">
    <div class="m-portlet__head">
        <div class="m-portlet__head-caption">
            <div class="m-portlet__head-title">
                <h3 class="m-portlet__head-text">
                    <i class="la la-user"></i> <@spring.message code="${entityName!}"/>
                </h3>
            </div>
        </div>
    </div>
    <div class="m-portlet__body">
        <div class="table-container">
            <@showMessage />
            <@tableHeaderButtons resourceIdentity='${resourceIdentity!}'/>
            <@tableColumnButtons resourceIdentity='${resourceIdentity!}'/>
            <table class="table table-striped- table-bordered table-hover table-checkable dataTable dtr-inline" id="datatable"
                   data-datatable="true"
                   data-datatable-advance-search="show"
                   data-datatable-quick-search-filter="search_LIKE_key_OR_message_OR_locale"
            >
                <thead>
                <tr role="row" class="heading">
                    <th width="1%" data-checkable="true" data-orderable="false"></th>
                    <th width="5%" data-data="id" data-searchable="false"> ID# </th>
                    <th width="15%" data-data="locale" data-render="renderLocaleType" data-search-type="<@searchTypeSelect items=types/>"> <@spring.message code="i18nResource.locale"/> </th>
                    <th width="5%" data-data="key"> <@spring.message code="i18nResource.key"/> </th>
                    <th data-data="message"> <@spring.message code="i18nResource.message"/> </th>
                    <th width="15%" class="center" data-data="lastModifiedDate" data-search-type="daterange" data-render="renderDateTime"> <@spring.message code="lastModifyDate"/> </th>
                    <th width="15%" data-actions="true"> <@spring.message code="action"/> </th>
                </tr>
                </thead>
                <tbody> </tbody>
            </table>
        </div>
    </div>
</div>

<page-plugin-style>
</page-plugin-style>
<page-style>
</page-style>
<page-plugin-script>
</page-plugin-script>
<page-script>
    <script>
        function renderLocaleType( data, type, full, meta ){
            <#list types as item>
                if(data == '${item}'){
                    return '<@spring.message code="${item.info}"/>'
                }
            </#list>
        }
    </script>
</page-script>